// 获取状态栏高度;
export const getStatusHeight = () => {
  return uni.getSystemInfoSync().statusBarHeight;
}
// 获取自定义头部高度
export const getCustomNavHeight = () => {
  if (uni.getMenuButtonBoundingClientRect) {
    let {
      top,
      height
    } = uni.getMenuButtonBoundingClientRect();
    return (top - getStatusHeight()) * 2 + height;
  } else { // 因为H5没有uni.getMenuButtonBoundingClientRect()这个api
    return 40;
  }
}
// 获取首页和分类页面顶部padding-top的值
export const getFillHeight = () => {
  return getStatusHeight() + getCustomNavHeight();
}


export const getLeftLogoPosInfo = () => {
  // #ifdef MP-TOUTIAO
  let {
    leftIcon: {
      width
    }
  } = tt.getCustomButtonBoundingClientRect();
  return parseInt(width);
  // #endif
  // #ifndef MP-TOUTIAO
  return 10;
  // #endif
}

